package at.fhj.itm11.forum.beans.stubs;

import at.fhj.itm11.forum.service.UserService;
import at.fhj.itm11.forum.service.dtos.UserDTO;
import at.fhj.itm11.forum.ws.FHJForumAuthWS_Service;

public class UserServiceStub implements UserService {

	public static final String EXISTING_USER = "user";
	public static final String NON_EXISTING_USER = "nouser";

	@Override
	public UserDTO findById(Long id) {
		return null;
	}

	@Override
	public UserDTO findByUsername(String username) {
		return null;
	}

	@Override
	public UserDTO login(String username, String password) {
		if (username.equals(EXISTING_USER)) {
			UserDTO user = new UserDTO();
			user.setId(123L);
			user.setUsername(username);
			return user;
		}

		return null;
	}

	@Override
	public void setServiceLocator(FHJForumAuthWS_Service serviceLocator) {
		// TODO Auto-generated method stub
		
	}

}
